<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>签到积分设置</title>
<link href="http://g.alicdn.com/bui/bui/1.1.21/css/bs3/dpl.css" rel="stylesheet">
<link href="http://g.alicdn.com/bui/bui/1.1.21/css/bs3/bui.css" rel="stylesheet">
<script src="https://g.alicdn.com/??kissy/k/1.4.2/seed-min.js"></script>
<script src="http://g.alicdn.com/bui/bui/1.1.21/adapter.js"></script>
<link href="http://g.tbcdn.cn/kissy/k/1.3.2/??calendar/assets/shopmanage/dpl-min.css" rel="stylesheet">
<script src="/assets/shopmanage/main.js"></script> 
<script src="/assets/shopmanage/gamecfg_1.js"></script>
<script src="/assets/shopmanage/global_menu_kissy.js"></script>
<link href="/assets/shopmanage/main.css" rel="stylesheet">
<style>
  .bui-tab-item{
    position: relative;
    
  }
  .bui-tab-item .bui-tab-item-text{
    padding-right: 25px;
  }
 
  .bui-tab-item .icon-remove{
    position: absolute;
    right: 2px;
    top:2px;
    z-index: 20;
    cursor: pointer;
  }
</style>

</head>
<body style="width:990px;margin:0 auto;padding:10px 0;">

 <div class="doc-content">
    <div class="panel">
      <div class="panel-body">
	  <div class="row">
		<div class="span24 doc-content">
		<h3 class="pull-left">我的互动 >> 签到积分设置</h3>
		<div class="button-group pull-right">
			{include file='../../../PublicView/global_menu.html'}
		</div>
		<!-- <span class="label label-info  pull-right"><i class="icon-white icon-home"></i></span> -->
		</div>
	  </div>
	  <hr />
	  <div class="button-group">
			<a href="/?c=jifen&m=Shopmanage" class="button {if $current=='jifen'}button-info{/if}"><i class=" icon-wrench {if $current=='jifen'}icon-white{/if}"></i>积分设置</a>
			<a href="/?c=jifen&a=qiandao&m=Shopmanage" class="button {if $current=='qiandao'}button-info{/if}"><i class="icon-user {if $current=='qiandao'}icon-white{/if}"></i>签到用户</a>
			<a href="/?c=jifen&a=user&m=Shopmanage" class="button {if $current=='jifenuser'}button-info{/if}"><i class="icon-gift {if $current=='jifenuser'}icon-white{/if}"></i>兑换列表</a>
			<a href="/?c=jifen&a=jforders&m=Shopmanage" class="button {if $current=='jforders'}button-info{/if}"><i class="icon-refresh {if $current=='jforders'}icon-white{/if}"></i>订单列表</a>
	  </div>
	  <hr />
	  <div class="tips tips-small tips-info">
        <span class="x-icon x-icon-small x-icon-info"><i class="icon icon-white icon-info"></i></span>
        <div class="tips-content">注意！签到和积分兑换功能不受时间限制</div>
      </div>
	  <br />
	  <div class="row">
  <div class="span24 doc-content">
  
		<div id="tab">
            <ul style="font-size:14px">
              <li class="bui-tab-panel-item active"><a href="###">每天签到送积分</a></li>
              <li class="bui-tab-panel-item"><a href="###">积分兑换奖品</a></li>
              <li class="bui-tab-panel-item"><a href="###">签到兑换奖品</a></li>
              <li class="bui-tab-panel-item"><a href="###">购物签到加成</a></li>
              <li class="bui-tab-panel-item"><a href="###">订单号兑换积分</a></li>
            </ul>
        </div>
		<div style="height:20px"></div>
		<form method="post" action="/?a=jifen_save&c=jifen&m=Shopmanage">
		<input type="hidden" name="gifts" value="{$gifts_json}" />
        <div id="panelcontent" style="min-height:400px;">
			<div class="form-horizontal" id="p1">
				<div class="row">
				<div class="control-group span24">
					<label class="control-label">每天签到积分：</label>
					<div class="controls control-row-auto span19 span-width">
						<div class="well well-small">
							<div class="row control-row1">
								<span class="auxiliary-text offset1">
				请填写积分奖励设置。用户每天签到，每天获取积分，连续签到获得积分更多。
								</span>
							</div>
								<div class="control-group">
									<label class="control-label"><span class="label label-warning">开关</span>：</label>
									<div class="controls">
										<select class="input-small onoff" data-input="jifen" name="onoff">
										<option value="0" {if $cfg.onoff==0}selected="selected"{/if}>关闭</option>
										<option value="1" {if $cfg.onoff==1}selected="selected"{/if}>打开</option>
										</select>积分功能总开关<i class=""></i>
									</div>
									<span class="x-icon x-icon-mini x-icon-info helper" data-tip="积分设置总开关，只有该选项开启后以下设置才生效">?</span>
								</div>
								<div class="control-group">
									<label class="control-label">连续签到：</label>
									<div class="controls">
										第一天<input type="text" {if $cfg.onoff==0}readonly="readonly" style="background:#DDD"{/if} class="span2 span-width control-text form jifen" name="day[]"  data-val="{$cfg.day[0]|default:10}" value="{$cfg.day[0]|default:10}">分
										第二天<input type="text" {if $cfg.onoff==0}readonly="readonly" style="background:#DDD"{/if} class="span2 span-width control-text form jifen" name="day[]"  data-val="{$cfg.day[1]|default:20}" value="{$cfg.day[1]|default:20}">分
										第三天<input type="text" {if $cfg.onoff==0}readonly="readonly" style="background:#DDD"{/if} class="span2 span-width control-text form jifen" name="day[]"  data-val="{$cfg.day[2]|default:40}" value="{$cfg.day[2]|default:40}">分
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">连续签到：</label>
									<div class="controls">
										第四天<input type="text" {if $cfg.onoff==0}readonly="readonly" style="background:#DDD"{/if} class="span2 span-width control-text form jifen" name="day[]"  data-val="{$cfg.day[3]|default:80}" value="{$cfg.day[3]|default:80}">分
										第五天<input type="text" {if $cfg.onoff==0}readonly="readonly" style="background:#DDD"{/if} class="span2 span-width control-text form jifen" name="day[]"  data-val="{$cfg.day[4]|default:100}" value="{$cfg.day[4]|default:100}">分
									</div>
								</div><div class="control-group">
									<label class="control-label">连续签到：</label>
									<div class="controls">
										以后每天<input type="text" {if $cfg.onoff==0}readonly="readonly" style="background:#DDD"{/if} class="span2 span-width control-text form jifen" name="day[]"  data-val="{$cfg.day[5]|default:100}" value="{$cfg.day[5]|default:100}">分
									</div>
								</div>
								<div class="row control-row1">
									<span class="auxiliary-text offset1">
										补签积分另算。如果用户漏签，不论是否补签，连续积分都从第一天计算。
									</span>
								</div>
								<div class="control-group">
									<label class="control-label "><span class="label label-info">补签</span>：</label>
									<div class="controls">
										允许<input type="text" {if $cfg.onoff==0}readonly="readonly" style="background:#DDD"{/if} class="span2 span-width control-text form jifen" name="buqian"  data-val="{$cfg.buqian|default:3}" value="{$cfg.buqian|default:3}">天内补签
										，每次补签可得<input type="text" {if $cfg.onoff==0}readonly="readonly" style="background:#DDD"{/if} class="span2 span-width control-text form jifen" name="buqianjifen"  data-val="{$cfg.buqianjifen|default:1}" value="{$cfg.buqianjifen|default:1}">积分
									</div>
									<span class="x-icon x-icon-mini x-icon-info helper" data-tip="日常签到时，获得签到指定积分、同时获得指定的积分加成。补签时，如果不允许获得加成，则仅获得指定的补签积分。">?</span>
								</div>
								<div class="control-group">
									<label class="control-label"> 补签加成：</label>
									<div class="controls">
										<select class="input-small form jifen" {if $cfg.onoff==0}readonly="readonly" style="background:#DDD"{/if}  name="buqianjiac">
										<option value="0" {if $cfg.buqianjiac==0}selected="selected"{/if}>-不加成-</option>
										<option value="1" {if $cfg.buqianjiac==1}selected="selected"{/if}>+加成+</option>
										</select>补签可不获得加成。受加成设置影响<i class=""></i>
									<span class="x-icon x-icon-mini x-icon-info helper" data-tip="日常签到时，获得签到指定积分、同时获得指定的积分加成。补签时，如果不允许获得加成，则仅获得指定的补签积分。按照满足已设置的加成条件计算">?</span>
									</div>
								</div>
						</div>
					</div>
				</div>
				</div>
			</div>
            <div class="form-horizontal" id="p4">
				<div class="row">
				<div class="control-group span24">
							<label class="control-label">积分兑换奖品：</label>
								<div class="controls control-row-auto span19 span-width">
									<div class="well well-small">
									<div class="row control-row1">
											<span class="auxiliary-text offset1 ">
												除实物奖外均自动发奖。先<a href="/?c=gifts&m=Shopmanage">设置奖品</a>，再设置兑换。
											</span>
										</div>
										<div class="control-group">
											<label class="control-label"><span class="label label-warning">开关</span>：</label>
											<div class="controls">
												<select class="input-small onoff" data-input="dhset" name="onoff_jfdh">
												<option value="0" {if $cfg.onoff_jfdh==0}selected="selected"{/if}>关闭</option>
												<option value="1" {if $cfg.onoff_jfdh==1}selected="selected"{/if}>打开</option>
												</select>积分兑换总开关<i class=""></i>
											</div>
											<span class="x-icon x-icon-mini x-icon-info helper" data-tip="开启后才可用积分兑换奖品">?</span>
										</div>
										{foreach from=$cfg.dh item=dhset key=dhkey name=name}
											<div class="control-group {if $smarty.foreach.name.last}div-duihuan{else}div-duihuan-{$dhkey}{/if} ">
												<label class="control-label">兑换奖品：</label>
												<div class="controls">
													<input type="text" {if $cfg.onoff_jfdh==0}readonly="readonly" style="background:#DDD"{/if} class="control-text span2 span-width dhset" value="{$dhset.jifen|default:0}" name="duihuan[]" data-post="duihuan" data-val="{$cfg.duihuan|default:'0'}">
													分兑换<i class=""></i>
													<select class="input-small form dhset" {if $cfg.onoff_jfdh==0}readonly="readonly" style="background:#DDD"{/if} name="gift[]">
													<option value="0">不兑换</option>
													{foreach from=$gifts item=item key=key}
													<option value="{$item.id}" {if $item.id==$dhset.gift}selected="selected"{/if}>{$item.name}</option>
													{/foreach}
													</select>
													奖品<i class=""></i>
													{if $smarty.foreach.name.last}
													<button class="button button-mini button-success js-duihuan" data-target="duihuan" type="button"  data-addid="add"><i class="icon icon-white icon-plus"></i><span>增加</span></button>
													{else}
													<button class="button button-mini button-danger js-duihuan" data-target="duihuan" type="button"  data-addid="{$dhkey}"><i class="icon icon-white icon-minus"></i><span>删除</span></button>
													{/if}
												</div>
												　<span class="x-icon x-icon-mini x-icon-info helper" data-tip="用户用积分兑换奖品的设置。">?</span>
											</div>
										{/foreach}
									</div>
								</div>
							</div>
				</div>
			</div>
			<div class="form-horizontal" id="p5">
				<div class="row">
				<div class="control-group span24">
							<label class="control-label">签到兑换奖品：</label>
								<div class="controls control-row-auto span19 span-width">
									<div class="well well-small">
									<div class="row control-row1">
											<span class="auxiliary-text offset1 ">
												除实物奖外均自动发奖。先<a href="/?c=gifts&m=Shopmanage">设置奖品</a>，再设置兑换。
											</span>
									</div>
									<div class="row control-row1  ">
											<span class="auxiliary-text offset1 tips tips-small tips-info">
												仅计算当月！每个月1号重新计算。最长有效连续签到31天。
											</span>
											　<span class="x-icon x-icon-mini x-icon-info helper" data-tip="每个月都重复赠送满足连续签到天数的奖品">?</span>
									</div>
									<div class="control-group">
										<label class="control-label"><span class="label label-warning">开关</span>：</label>
										<div class="controls">
											<select class="input-small onoff" data-input="qddhset" name="onoff_qddh">
											<option value="0" {if $cfg.onoff_qddh==0}selected="selected"{/if}>关闭</option>
											<option value="1" {if $cfg.onoff_qddh==1}selected="selected"{/if}>打开</option>
											</select>签到兑换总开关<i class=""></i>
										</div>
										<span class="x-icon x-icon-mini x-icon-info helper" data-tip="开启后才可签到兑换">?</span>
									</div>
									{foreach from=$cfg.qddh item=qddhset key=qddhkey name=qddh}
											<div class="control-group {if $smarty.foreach.qddh.last}div-qddh{else}div-qddh-{$qddhkey}{/if}">
												<label class="control-label">签到拿奖品：</label>
												<div class="controls">
													连续签<input type="text" {if $cfg.onoff_qddh==0}readonly="readonly" style="background:#DDD"{/if} class="control-text span2 span-width qddhset" value="{$qddhset.tian|default:'0'}" name="tian[]">
													天兑换<i class=""></i>
													<select class="input-small form qddhset" {if $cfg.onoff_qddh==0}readonly="readonly" style="background:#DDD"{/if} name="qddhgift[]">
													<option value="0">不兑换</option>
													{foreach from=$gifts item=item key=key}
													<option value="{$item.id}" {if $item.id==$qddhset.gift}selected="selected"{/if}>{$item.name}</option>
													{/foreach}
													</select>奖品<i class=""></i>
													{if $smarty.foreach.qddh.last}
														<button class="button button-mini button-success js-qddh" data-target="qddh" type="button"  data-addid="add"><i class="icon icon-white icon-plus"></i><span>增加</span></button>
														{else}
														<button class="button button-mini button-danger js-qddh" data-target="qddh" type="button"  data-addid="{$qddhkey}"><i class="icon icon-white icon-minus"></i><span>删除</span></button>
													{/if}
												</div>
												　<span class="x-icon x-icon-mini x-icon-info helper" data-tip="满足连续签到条件可领取的奖品。每个设置只能领取一次。">?</span>
											</div>
									{/foreach}
									</div>
								</div>
							</div>
				</div>
			</div>
			<div class="form-horizontal" id="p2">
				<div class="row">
				 <div class="control-group span24">
							<label class="control-label">签到加成：</label>
								<div class="controls control-row-auto span19 span-width">
									该功能正在开发
								</div>
								<div class="controls control-row-auto span19 span-width" style="visibility:hidden">
									<div class="well well-small">
										<div class="row control-row1">
											<span class="auxiliary-text offset1 tips tips-small tips-info">
												买家兑换积分的订单号购物总额达到指定金额，每天签到增加的分数。
											</span>
										</div>
										<div class="row control-row1">
											<span class="auxiliary-text offset1 tips tips-small tips-warning">
												注意！本功能必须配合订单号兑换积分一同使用。
											</span>
											　<span class="x-icon x-icon-mini x-icon-info helper" data-tip="用户通过订单号兑换积分，累计订单金额达到指定金额，每天签到都额外奖励的积分数量。如果不开启订单号兑换积分，就不能累计到用户购买的总金额。可以设置订单满1元兑换1积分这样的设置来完成订单金额的累计。">?</span>
										</div>
										<div class="control-group">
											<label class="control-label"><span class="label label-warning">开关</span>：</label>
											<div class="controls">
												<select class="input-small onoff" data-input="jcset" name="onoff_qdjc">
												<option value="0" {if $cfg.onoff_qdjc==0}selected="selected"{/if}>关闭</option>
												<option value="1" {if $cfg.onoff_qdjc==1}selected="selected"{/if}>打开</option>
												</select>加成总开关<i class=""></i>
											</div>
											<span class="x-icon x-icon-mini x-icon-info helper" data-tip="开启后才可获得签到加成">?</span>
										</div>
										{foreach from=$cfg.jc item=jcset key=jckey name=jiacheng}
											<div class="control-group {if $smarty.foreach.jiacheng.last}div-jiacheng{else}div-jiacheng-{$jckey}{/if} ">
												<label class="control-label">兑换订单额满：</label>
												<div class="controls">
													<input type="text" {if $cfg.onoff_qdjc==0}readonly="readonly" style="background:#DDD"{/if} class="control-text span2 span-width jcset" value="{$jcset.jine|default:'0'}" name="jcje[]">
													元，每次签到加
													<input type="text" {if $cfg.onoff_qdjc==0}readonly="readonly" style="background:#DDD"{/if} class="control-text span2 span-width jcset" value="{$jcset.jifen|default:'0'}" name="jcjf[]">
													积分<i class=""></i>
													{if $smarty.foreach.jiacheng.last}
														<button class="button button-mini button-success js-jiacheng" type="button" data-target="jiacheng"  data-addid="add"><i class="icon icon-white icon-plus"></i><span>增加</span></button>
														{else}
														<button class="button button-mini button-danger js-jiacheng" type="button" data-target="jiacheng"  data-addid="{$jckey}"><i class="icon icon-white icon-minus"></i><span>删除</span></button>
													{/if}
												</div>
												　<span class="x-icon x-icon-mini x-icon-info helper" data-tip="每达到累计订单金额，获得的签到加分。必须配合订单兑换积分使用。">?</span>
											</div>
										{/foreach}
									</div>
								</div>
							</div>
				</div>
			</div>
            <div class="form-horizontal" id="p3">
				<div class="row">
				<div class="control-group span24">
							<label class="control-label">订单号兑换积分：</label>
								<div class="controls control-row-auto span19 span-width">
									该功能正在开发
								</div>
								<div class="controls control-row-auto span19 span-width" style="visibility:hidden">
									<div class="well well-small">
										<div class="row control-row1">
											<span class="auxiliary-text offset1 tips tips-small tips-info">
												按照满足最高单金额的一条计算。不累计、不翻倍。仅确认收货的订单可以兑换。
											</span>
											　<span class="x-icon x-icon-mini x-icon-info helper" data-tip="此处的设置按照满足最高订单金额的一条计算。例如：同时设置满1元兑换2分，和满100元兑换10分，则1~99元订单可得2分，100元订单可得10分。不要设置1元200分，100元10分这样的参数，否则满100元订单只能获得10分，1~99元反而能获得200分。">?</span>
										</div>
										<div class="control-group">
											<label class="control-label"><span class="label label-warning">开关</span>：</label>
											<div class="controls">
												<select class="input-small onoff" data-input="dddhjfset"  name="onoff_dddhjf">
												<option value="0" {if $cfg.onoff_dddhjf==0}selected="selected"{/if}>关闭</option>
												<option value="1" {if $cfg.onoff_dddhjf==1}selected="selected"{/if}>打开</option>
												</select>订单兑换积分总开关<i class=""></i>
											</div>
											<span class="x-icon x-icon-mini x-icon-info helper" data-tip="开启后才可以订单号兑换积分">?</span>
										</div>
										{foreach from=$cfg.dddhjf item=dddhjfset key=dddhjfkey name=dddhjf}
											<div class="control-group {if $smarty.foreach.dddhjf.last}div-dingdanjifen{else}div-dingdanjifen-{$jckey}{/if}">
												<label class="control-label">单笔订单满：</label>
												<div class="controls">
													<input type="text" {if $cfg.onoff_dddhjf==0}readonly="readonly" style="background:#DDD"{/if} class="control-text span2 span-width dddhjfset" value="{$dddhjfset.ddje|default:'0'}" name="ddje[]">
													元，可兑换
													<input type="text" {if $cfg.onoff_dddhjf==0}readonly="readonly" style="background:#DDD"{/if} class="control-text span2 span-width dddhjfset" value="{$dddhjfset.dhjf|default:'0'}" name="dhjf[]">
													积分<i class=""></i>
													{if $smarty.foreach.dddhjf.last}
														<button class="button button-mini button-success js-dingdanjifen" type="button" data-target="dingdanjifen"  data-addid="add"><i class="icon icon-white icon-plus"></i><span>增加</span></button>
														{else}
														<button class="button button-mini button-danger js-dingdanjifen" type="button" data-target="dingdanjifen"  data-addid="{$jckey}"><i class="icon icon-white icon-minus"></i><span>删除</span></button>
													{/if}
												</div>
												　<span class="x-icon x-icon-mini x-icon-info helper" data-tip="每达到累计消费金额，获得的签到加分">?</span>
											</div>
										{/foreach}
									</div>
								</div>
							</div>
				</div>
			</div>
			<!-- <div class="form-horizontal" id="p4">
				<div class="row">
				
				</div>
			</div>
			<div class="form-horizontal" id="p4">
				<div class="row">
				
				</div>
			</div> -->
        </div>
		  
			<div class="control-group span24 centered res">
			<button class="button save button-success" type="submmit" >保存设置</button>
			</div>
		</form>

</div>

      </div>
    </div>
  </div>
</body>
</html>